// index.js

const util = require('../../utils/util.js')

Page({
  data: {
    logs: [],
    date:new Date().toLocaleString(),
    sewage:{
      month:0,
      year:"14963,138"
    }
  },
  toVideo(){
    wx.navigateTo({
      url:'/pages/video/video'
    })
  },
  toWater(){
    wx.navigateTo({
      url:'/pages/water/water'
    })
  },
  onLoad() {
    this.setData({
      logs: (wx.getStorageSync('logs') || []).map(log => {
        return {
          date: util.formatTime(new Date(log)),
          timeStamp: log
        }
      })
    })
  },
  handler(){
  }
})
